﻿using AdminBase.Model;
using AdminBase.Model.Entitys;

namespace AdminBase.Interface
{
    /// <summary>
    /// 部门业务接口
    /// </summary>
    public interface IDepartmentsService
    {
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="entity">实体</param>
        /// <returns></returns>
        bool Add(Departments entity);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        bool Edit(Departments entity);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool Del(long id);

        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        bool BatchDel(List<long> ids);

        /// <summary>
        /// 根据ID获取
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        DepartmentsDto GetById(long id);

        /// <summary>
        /// 获取列表
        /// </summary>
        /// <param name="queryParam">查询参数</param>
        /// <returns></returns>
        PageInfo GetDepartments(DepartmentsQueryParam queryParam);

        /// <summary>
        /// 获取树形数据
        /// </summary>
        /// <returns></returns>
        List<TreeDto> GetTreeData();
    }
}
